<?php
/**
 * 我的证书
 * @author LXF
 * @date 2018.8.27
 */
namespace App\Http\Controllers\Crm;

use App\Http\Controllers\BaseController;
use App\Servers\Ajax;
use Illuminate\Http\Request;
use App\Model\Crm\MySpecialModel;

class MySpecialController extends BaseController {
    
    public function specialList(){
        $listinfo = MySpecialModel::listSpecial();
        dd($listinfo);
    }
    /***
     *添加我的证书 
     * lxf
     ***/
    public function add(Request $request) {
       // $a = $request->all();dd($a);exit;
        $user_id = addslashes($request->get('user_id'));
        $year   = addslashes($request->get('year'));
        $data = [
            'user_id' => 1,
            'special_name' => '专题名称',
            'study_site' => '学习地点',
            'content_brief'=> '内容简要',
            'study_time'=>time(),
            'study_harvest'=>'学习成果',
            'study_type'=>2,
            'creat_at' => time(),
            'update_at' => time(),
        ];
       
       $a  = MySpecialModel::addSpecial($data);
       echo $a;
       
    }
     /***
     *修改我的证书 
     * lxf
     ***/
    public function update() {
        $where['user_id'] =1;
        $data['update_at'] = time();        
        $res= MySpecialModel::updateSpecial($where,$data);
        echo $res;
    }
     /***
     *修改我的证书
     * lxf
     ***/
    public function del() {
        $where['id'] =1;
        $data['is_del'] = 1;
        $res= MySpecialModel::updateSpecial($where,$data);
        echo $res;
    }
}
